package cn.com.cfae.iras.doc.analyze.parse.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 偿债能力
 */
public class CZNLModel extends BizBaseModel {
    /**
     * 偿债能力
     */
    public static String MODEL_NAME = "CZNL";

    private static Map<String, String> items = new HashMap<>();


    /**
     * 流动比例
     */
    private static String LDBL="LDBL";
    /**
     * 速动比率
     */
    private static String SDBL="SDBL";
    /**
     * 资产负债率
     */
    private static String ZCFZL="ZCFZL";
    /**
     * 现金流动负债比
     */
    private static String XJLDFZB="XJLDFZB";
    /**
     * 现金负债总额比
     */
    private static String XJFZZEB="XJFZZEB";
    /**
     * 有形净值债务率
     */
    private static String YXJZZWL="YXJZZWL";
    /**
     * EBIT
     */
    private static String EBIT="EBIT";
    /**
     * 利息保障倍数
     */
    private static String LXBZBS="LXBZBS";

    /**
     * EBITDA
     */
    private static String EBITDA="EBITDA";
    /**
     * 债务保护倍数
     */
    private static String ZWBHBS="ZWBHBS";

    /**
     * 短期债务
     */
    private static String DQZW="DQZW";

    /**
     * 长期债务
     */
    private static String CQZW="CQZW";

    /**
     * 销售现金比率
     */
    private static String XSXJBL="XSXJBL";

    /**
     * 全部资产现金回收率
     */
    private static String QBZCXJHSL="QBZCXJHSL";

    /**
     * EBITDA利息倍数
     */
    private static String EBITDA_LXBS="EBITDA_LXBS";

    static {
        items.put(LDBL, "流动比率");
        items.put(SDBL, "速动比率");
        items.put(ZCFZL, "资产负债率");
        items.put(XJLDFZB, "现金流动负债比");
        items.put(XJFZZEB, "现金负债总额比");
        items.put(YXJZZWL, "有形净值债务率");
        items.put(EBIT, "EBIT");
        items.put(LXBZBS, "利息保障倍数|利息倍数|保障倍数");
        items.put(EBITDA, "EBITDA");
        items.put(ZWBHBS, "债务保护倍数");
//        items.put(DQZW, "短期债务");
//        items.put(CQZW, "长期债务");
        items.put(XSXJBL, "销售现金比率");
        items.put(QBZCXJHSL, "全部资产现金回收率");
//        items.put(EBITDA_LXBS, "EBITDA利息倍数");
    }

    public static List<ExtractItem> createExtractItemList() {
        List<ExtractItem> extractItemList = new ArrayList<>();
        items.forEach((key, value) -> {
            ExtractItem extractItem =  new ExtractItem();
            extractItem.setItemName(key);
            extractItem.setSynonyms(value.split(SYNONYM_SPLIT_CHAR));
            extractItemList.add(extractItem);
        });
        return extractItemList;
    }

}
